package com.netease.financial.domain.interactor;

import com.netease.financial.domain.executor.PostExecutionThread;
import com.netease.financial.domain.executor.ThreadExecutor;
import com.netease.financial.domain.repository.NfsRepository;

import java.util.List;

import rx.Observable;

/**
 * Created by hzwuyufeng on 2/15/16.
 */
public class GetPageInfo extends UseCase {

    private final String pageName;
    private final List<String> elements;
    private final int widthPixels;
    private final int heightPixels;
    private final String platform;
    private final NfsRepository nfsRepository;

    public GetPageInfo(String pageName, List<String> elements, int widthPixels, int heightPixels, String platform,
                       NfsRepository nfsRepository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread) {
        super(threadExecutor, postExecutionThread);
        this.pageName = pageName;
        this.elements = elements;
        this.widthPixels = widthPixels;
        this.heightPixels = heightPixels;
        this.platform = platform;
        this.nfsRepository = nfsRepository;
    }

    @Override
    protected Observable buildUseCaseObservable() {
        return nfsRepository.getPageInfo(pageName, elements, widthPixels, heightPixels, platform);
    }

}
